#pragma once
#include "afxwin.h"


// CUserLogon dialog

class CUserLogon : public CDialogEx
{
	DECLARE_DYNAMIC(CUserLogon)

public:
	CUserLogon(CWnd* pParent = NULL);   // standard constructor
	virtual ~CUserLogon();

// Dialog Data
	enum { IDD = IDD_USER_LOGON };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

public:
  afx_msg void OnCbnSelchangeUserRole();

public:
  int role(void) const;
  tstring Name(void) { return name_.GetBuffer(0); }
  std::string password(void) { return password_.GetBuffer(0); }

private:
  int role_;
  CString name_;
  CString password_;
};


// CUserAdd dialog

class CUserAdd : public CDialogEx
{
	DECLARE_DYNAMIC(CUserAdd)

public:
	CUserAdd(CWnd* pParent = NULL);   // standard constructor
	virtual ~CUserAdd();

// Dialog Data
	enum { IDD = IDD_USER_ADD };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

public:
  virtual BOOL OnInitDialog();

public:
  int role(void) const;
  std::string logon_password(void) { return logon_password_.GetBuffer(0); }
  tstring new_username(void) { return new_username_.GetBuffer(0); }
  std::string new_password(void) { return new_password_.GetBuffer(0); }

private:
  CComboBox wnd_role_;
  int role_;
  CString logon_password_;
  CString new_username_;
  CString new_password_;
};


// CUserModify dialog

class CUserModify : public CDialogEx
{
	DECLARE_DYNAMIC(CUserModify)

public:
	CUserModify(CWnd* pParent = NULL);   // standard constructor
	virtual ~CUserModify();

// Dialog Data
	enum { IDD = IDD_USER_EDIT };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

	DECLARE_MESSAGE_MAP()

public:
  std::string old_password(void) { return old_password_.GetBuffer(0); }
  std::string new_password(void) { return new_password_.GetBuffer(0); }

private:
  CString old_password_;
  CString new_password_;
};
